package cn.com.yusys.yusp.admin.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.yusys.yusp.admin.repository.mapper.AdminUserMapper;
import cn.com.yusys.yusp.admin.service.AdminUserService;
import cn.com.yusys.yusp.commons.mapper.QueryModel;

/**
 * 迁移yusp-app-message-core工程中的orgServiceImpl类
 * 
 * @author tangxb
 * @since 2.1.1
 */
@Service
public class AdminUserServiceImpl implements AdminUserService {
    
	@Autowired
	private AdminUserMapper mapper;
	
	@Override
	public List<Map<String, Object>> selectAllUser(QueryModel queryModel) {
		List<Map<String, Object>> result = mapper.selectAllUser( queryModel);
		return result;
	}
	
	@Override
	public List<Map<String, Object>> selectAllOrg(QueryModel queryModel) {
		List<Map<String, Object>> result = mapper.selectAllOrg( queryModel);
		return result;
	}
	
	@Override
	public List<Map<String, Object>> selectAllRole(QueryModel queryModel) {
		List<Map<String, Object>> result = mapper.selectAllRole( queryModel);
		return result;
	}
	
	@Override
	public List<Map<String, Object>> selectAllDuty(QueryModel queryModel) {
		List<Map<String, Object>> result = mapper.selectAllDuty( queryModel);
		return result;
	}

	/**
     * 以下方法为新增，只是为了迁移后使用微服务模式进行调用，需要配合UserMapper使用
     */
    @Override
    public List<Map<String, Object>> selectUserInfo(String loginCode) {
        return mapper.selectUserInfo(loginCode);
    }

    @Override
    public List<String> selectOrgUser(String orgId) {
        return mapper.selectOrgUser(orgId);
    }

    @Override
    public List<String> selectRoleUser(String roleCode) {
        return mapper.selectRoleUser(roleCode);
    }

    @Override
    public List<String> selectDutyUser(String dutyCde) {
        return mapper.selectDutyUser(dutyCde);
    }

    @Override
    public List<String> selectUserOrg(String userId) {
        return mapper.selectUserOrg(userId);
    }

    @Override
    public List<String> selectOrgsUsers(List<String> orgIds) {
        return selectOrgsUsers(orgIds);
    }

    @Override
    public List<String> selectUpOrg(String orgId) {
        return mapper.selectUpOrg(orgId);
    }

    @Override
    public List<String> selectUpOrgOrgs(String orgId) {
        return mapper.selectUpOrgOrgs(orgId);
    }

}
